<template>
    <div class="index">
        <Header></Header>
        <!--搜索-->
        <div class="header-img-contain">
            <div class="flex-column-centers">

                <div class="search-title" v-if="userType">
                    <router-link to="/jobs" class="active" v-if="userType != 'company'">找工作</router-link>
                    <router-link to="/looking-for-talent" class="active" v-else>找人才</router-link>
                </div>
                <div class="search-title" v-else>
                    <router-link to="/jobs" class="active">找工作</router-link>
                    <router-link to="/looking-for-talent">找人才</router-link>
                </div>

                <div class="search-contain">
                    <div class="job-search-bg search-input-contain">
                        <input type="text" v-model="search" :placeholder="userType != 'company' ? '请输入您要寻找的职位！' : '请输入您要寻找的人才信息！'">
                    </div>
                    <div class="search-button-contain mt10">
                        <button class="pointer" title="搜索" @click="goToSearch('/job')">
                            <i class="search-button-icons"></i>
                        </button>
                    </div>
                </div>

               <!-- <div class="hot-tag">
                    <em>热门关键字：</em>
                    <span v-for="(item, index) in hotKeys" :key="index">{{item}}</span>
                </div>-->
            </div>
        </div>
        <router-view ref=""></router-view>
        <Footer></Footer>
    </div>
</template>
<script>
import Header from '@/views/components/header/header'
import Footer from '@/views/components/header/footer'

export default {
    name: 'index',
    data() {
        return {
            userType: this.$store.getters.userType,
            img: require('../../assets/image/profile.jpg'),
            search: '',
            hotKeys: ''
        }
    },
    components: { Header, Footer },
    mounted() {
    },
    methods: {}
}
</script>

<style lang="scss" scoped>
 .header {
    position: absolute;
    width: 100%;
    top: 0;
} 

.header .top {
    background: rgba(0, 0, 0, 0.52);
}

.header .nav {
    background: rgba(0, 0, 0, 0.45);
}
</style>

<style lang="scss" scoped>
.header-img-contain {
    width: 100%;
    min-width: 1200px;
    height: 306px;
    background: url('../../assets/image/enterprise/jxsx-bg.png') no-repeat;
    background-size: 100% 100%;


    .flex-column-centers {
        width: 540+86px;
        position: absolute;
        top: 140px;
        left: 50%;
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);

        .search-title {
            font-size: 18px;
            font-weight: bold;
            color: #FFFFFF;
            margin-bottom: 5px;
            opacity: 0.78;

            a {
                margin-left: 30px;

                &.active {
                    font-size: 24px;
                    color: #F5F5F5;
                }

                &:last-child {
                    margin-left: 15px;
                }
            }
        }

        .search-contain {
            overflow: hidden;
            width: 539+88px;

            .job-search-bg {
                float: left;
                width: 539px;
                height: 62px;
                background: url('../../assets/image/search-bg-1.png') no-repeat;
                background-size: 100%;

                input {
                    outline: none;
                    width: 539px;
                    height: 48px;
                    margin-top: 12px;
                    margin-left: 2px;
                    font-size: 18px;
                    border: 0;
                    background: none;
                    font-weight: 400;
                    color: #fff;
                    padding-left: 25px;
                    border-radius: 50px;

                    &::-webkit-input-placeholder { /* WebKit, Blink, Edge */
                        color: #E4E4E4;
                    }

                    &:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
                        color: #E4E4E4;
                    }

                    &::-moz-placeholder { /* Mozilla Firefox 19+ */
                        color: #E4E4E4;
                    }

                    &:-ms-input-placeholder { /* Internet Explorer 10-11 */
                        color: #E4E4E4;
                    }
                }
            }

            .search-button-contain {
                float: right;
                width: 88px;
                height: 52px;
                background: url('../../assets/image/enterprise/search-button-bg.png') no-repeat;
                background-size: 100%;

                button {
                    background: transparent;
                    width: 88px;
                    height: 52px;
                    border-width: 0px !important;
                    outline: none;

                    .search-button-icons {
                        margin-left: 25px;
                        display: block;
                        width: 27px;
                        height: 28px;
                        background: url('../../assets/image/enterprise/search-button-icons.png') no-repeat;
                    }
                }
            }
        }

        .hot-tag {
            width: 539+88px;
            margin-top: 20px;
            padding-left: 30px;
            color: #F5F5F5;

            em {
                font-style: normal;
            }

            span {
                display: inline-block;
                margin-right: 10px;
                cursor: pointer;
                font-size: 14px;
            }
        }
    }
}
</style>
<style>
.service-title {
    padding: 36px 0;
    text-align: center;
    color: #5E9F8E;
}

.service-title h2 {
    font-size: 36px;
    line-height: 52px;
}

.service-title p {
    font-size: 14px;
    line-height: 24px;
    text-transform: uppercase;
}

.page {
    width: 100%;

    margin: auto;
    padding: 12px 0;
    text-align: center;
    position: relative;
}

.page::after {
    content: " ";
    border-top: 2px solid #eeeeee;
    position: absolute;
    width: 610px;
    top: 0;
    left: calc(50% - 305px);
}

.page .a {
    padding: 0 12px;
    margin: 0 4px;
    height: 30px;
    line-height: 30px;
    font-size: 13px;
    color: #666;
    border: 1px solid #ccc;
    display: inline-block;
    border-radius: 4px;
}

.page .a.on {
    background: #BE475D;
    color: #fff;
}

.page input {
    width: 50px;
    height: 38px;
    box-sizing: border-box;
    border: 1px solid #E6E6E6;
    font-size: 14px;
    text-align: center;
}
</style>
<style lang="scss" scoped>
.header {
    position: absolute;
    width: 100%;
    top: 0;
    >>>.top{
        background: rgba(0, 0, 0, 0.52);
    }
    >>>.nav {
        background: rgba(0, 0, 0, 0.45);
    }
}
>>> .el-pagination {
    padding: 50px 0 80px 0;
    text-align: center;

    button {
        cursor: pointer;
        outline: none;
        width: 70px;
        height: 30px;
        background-color: #ffffff;
        border: 1px solid #ebebeb;
        border-radius: 4px;
        font-size: 14px;
        color: #777777;
        margin-left: 5px;
        margin-right: 5px;
        font-weight: 400;

        &:disabled {
            color: #bbbbbb;
        }
    }

    .btn-prev {
        background-color: #ffffff;
    }

    .btn-next {
        background-color: #ffffff;
    }

    .el-pager {
        .number {
            background: #ffffff;
            border: 1px solid #ebebeb;
            font-weight: normal;
            width: 30px;
            height: 30px;
            color: #777777;

            &.active {
                background: #3dabc4;
                border-radius: 4px;
                color: white;
            }
        }

        .el-icon {
            background-color: #fff;
        }
    }
}
</style>
